<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>work2</title>
    <script type="text/javascript" src="../js/vue.js"></script>
    <style>
        .mydiv {
            padding-left: 30px;
        }

        .div1 {
            width: 900px;
            height: 600px;
            float: left;
        }

        .div2 {
            width: 300px;
            height: 600px;
            float: left;
            margin-left: 100px;
        }

        .div3 {
            float: left;
        }

        .img {
            border-radius: 45px;
        }

        .div4 {
            height: 110px;
            padding-top: 20px;
            /*border: 1px solid black;*/
        }

        .div5 {
            float: left;
            margin-left: 50px;
        }

        .div6 {
            float: right;
            margin-top: 30px;
            /*margin-bottom: 0px;
            padding-bottom: 0px;
            border: 1px solid red;*/
        }

        .hr {
            color: #e0dddd;
        }
        .myhr {
            color: #e0dddd;
            margin-top: 47px;
        }
    </style>
</head>

<body>
    <div id="app" class="mydiv">
        <div class="div1">
            <div>
                <h2>课程互动</h2>
            </div>

            <div>
                <div class="div4" v-for="review in reviews">
                    <div>
                        <hr class="hr">
                    </div>
                    <div class="div3">
                        <img :src="review.headimg" alt="" width="90px" height="90px" class=img>
                    </div>
                    <div class="div5">
                        <span>评论课程：</span><br>
                        <span style="color: red;">{{review.coursename}}</span><br>
                        <span>{{review.detail}}</span>
                    </div>
                    <div class="div6">
                        {{review.time}}
                    </div>
                    
                </div>
            </div>
        </div>
        <div class="div2">
            <h2>学生动态</h2>
            <hr class="myhr">
        </div>
    </div>
</body>

</html>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            reviews: [
                { headimg: "../images/model1.png", coursename: "《java基础1》", detail: "支持1，不错！", time: "2020-11-25 21:21" },
                { headimg: "../images/model2.jpg", coursename: "《java基础2》", detail: "支持2，不错！", time: "2020-11-25 21:21" },
                { headimg: "../images/model4.jpg", coursename: "《java基础3》", detail: "支持3，不错！", time: "2020-11-25 21:21" },
                { headimg: "../images/model5.jpg", coursename: "《java基础4》", detail: "支持4，不错！", time: "2020-11-25 21:21" }
            ]
        }
    });
</script>